﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
//using System.ComponentModel.DataAnnotations.Schema;

namespace CodeCamp.Model
{
    //[Table("cc_Tasks")]
    public class Task
    {
        //[Key]
        //[DatabaseGenerated(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        //[ForeignKey("Event")]
        public int EventId { get; set; }

        [Required]
        public virtual Event Event { get; set; }

        private ICollection<Tasks_Timeslot> _tasks_Timeslot;
        public virtual ICollection<Tasks_Timeslot> Tasks_Timeslots
        {
            get { return _tasks_Timeslot ?? (_tasks_Timeslot = new List<Tasks_Timeslot>()); }
            protected set { _tasks_Timeslot = value; }
        }

        [Required]
        [MaxLength(128)]
        public string Name { get; set; }

        [MaxLength(1024)]
        public string Notes { get; set; }
    }
}
